import autoprefixer from 'autoprefixer';
import pxToRem from 'postcss-pxtorem';
import cssnano from 'cssnano';
import stylelint from 'stylelint';
import precss from 'precss';
export default {
    plugins: [
        precss(),
        autoprefixer,
        // pxToRem({
        //     rootValue: 50
        // }),
        cssnano({
            preset: 'default'
        }),
        stylelint({
            extends: 'stylelint-config-standard',
            plugins: [
                'stylelint-scss',
                'stylelint-order'
            ],
            rules: {
                "order/properties-order": [
                    //布局属性
                    "position",
                    "top",
                    "left",
                    "right",
                    "bottom",
                    "z-index",
                    "float",
                    "clear",
                    "display",
                    "overflow",
                    "overflow-x",
                    "overflow-y",
                    "flex",
                    //尺寸属性
                    "width",
                    "min-width",
                    "max-width",
                    "height",
                    "min-height",
                    "max-height",
                    "box-sizing",
                    "margin",
                    "margin-top",
                    "margin-left",
                    "margin-right",
                    "margin-bottom",
                    "padding",
                    "padding-top",
                    "padding-left",
                    "padding-right",
                    "padding-bottom",
                    "border",
                    "border-width",
                    "border-style",
                    "border-color",
                    "border-colors",
                    "border-top",
                    "border-top-width",
                    "border-top-style",
                    "border-top-color",
                    "border-top-colors",
                    "border-left",
                    "border-left-width",
                    "border-left-style",
                    "border-left-color",
                    "border-left-colors",
                    "border-right",
                    "border-right-width",
                    "border-right-style",
                    "border-right-color",
                    "border-right-colors",
                    "border-bottom",
                    "border-bottom-width",
                    "border-bottom-style",
                    "border-bottom-color",
                    "border-bottom-colors",
                    "border-radius",
                    "border-top-left-radius",
                    "border-top-right-radius",
                    "border-bottom-left-radius",
                    "border-bottom-right-radius",
                    "border-image",
                    "border-image-source",
                    "border-image-slice",
                    "border-image-width",
                    "border-image-outset",
                    "border-image-repeat",
                    //文字属性
                    "font",
                    "font-family",
                    "font-style",
                    "font-stretch",
                    "font-weight",
                    "font-variant",
                    "font-size",
                    "color",
                    "line-height",
                    "line-clamp",
                    "vertical-align",
                    "writing-mode",
                    "text-overflow",
                    "text-decoration",
                    "text-decoration-line",
                    "text-decoration-style",
                    "text-decoration-color",
                    "text-decoration-skip",
                    "text-underline-position",
                    "text-align",
                    "text-align-last",
                    "text-justify",
                    "text-indent",
                    "text-stroke",
                    "text-stroke-width",
                    "text-stroke-color",
                    "text-shadow",
                    "text-transform",
                    "text-size-adjust",
                    //界面属性
                    "appearance",
                    "outline",
                    "outline-width",
                    "outline-style",
                    "outline-color",
                    "outline-offset",
                    "outline-radius",
                    "outline-radius-topleft",
                    "outline-radius-topright",
                    "outline-radius-bottomleft",
                    "outline-radius-bottomright",
                    "background",
                    "background-color",
                    "background-image",
                    "background-repeat",
                    "background-repeat-x",
                    "background-repeat-y",
                    "background-position",
                    "background-position-x",
                    "background-position-y",
                    "background-size",
                    "background-origin",
                    "background-clip",
                    "background-attachment",
                    "bakground-composite",
                ],
            },
            fix: true
        })
    ]
}